package correct.day3;

import java.util.Arrays;
import java.util.Scanner;

public class Test33 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        int[] arr = new int[n];
        int sum = 0;
        int j = 0;
        for(int i = 0; i < n; i++) {
            int a = sc.nextInt();
            sum += a;
            if(a % 2 == 0) {
                arr[j] = a;
                j++;
            }
        }

        Arrays.sort(arr);
        for(int i = 0; i < k; i++) {
            sum -= (arr[j-i] / 2);
            Arrays.sort(arr);
        }
        System.out.println(sum);
    }
}
